const mongoose = require("mongoose")
const userSchema = mongoose.Schema({
  username: {
    type: String,
    required: true,
    minlength: 2,
    maxlength: 10
  },
  password: String,
  createTime: String,
  blog: Array
})

// 准备这个模型,可以在model中操作数据库
module.exports = mongoose.model("user",userSchema,"users")